package com.qf.im.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.qf.im.base.BaseEntity;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import java.io.Serializable;

/**
 * 好友申请表(FriendRequest)表实体类
 *
 * @author makejava
 * @since 2023-10-30 14:17:04
 */
@Data
@Accessors(chain = true)
public class FriendRequest extends BaseEntity implements Serializable {
    //主键
    @TableId(type = IdType.AUTO)
    private Integer id;
    //申请者id
    private Integer reqId;
    //被申请者id
    @NotNull(message = "添加好友ID不能为空")
    private Integer toId;
    //验证消息
    @Length(min = 0, max = 100, message = "验证消息长度不能超过{max}")
    private String info;
    //被申请者的备注
    @Length(min = 0, max = 20, message = "备注消息长度不能超过{max}")
    private String beizhu;
}

